Skip to content

feat: Run plugin refactor and installer bundling#9

Merged
tonythethompson merged 12 commits into
masterfrom
pr/run-plugin-and-installer
Jul 3, 2026
Merged

feat: Run plugin refactor and installer bundling#9
tonythethompson merged 12 commits into
masterfrom
pr/run-plugin-and-installer

Conversation

@tonythethompson

Copy link
Copy Markdown
Owner

Summary

  • Slim QuickShell.Run Main.cs; add RunQueryScoring for better result ranking.
  • Improve Run editor multi-launch save path.
  • Bundle Run plugin in Inno Setup; harden build-run-plugin deploy scripts.

Test plan

  • dotnet build QuickShell.Run
  • Manual: install via updated Inno script; verify Run plugin loads

Copilot AI review requested due to automatic review settings July 2, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the PowerToys Run plugin implementation to improve result ranking (especially for bare qs browse mode) and updates installer/build tooling so the Run plugin is bundled alongside the Command Palette extension in the Inno Setup EXE installer. It also adjusts the Run shortcut editor to better handle multi-launch workspaces and documents the new distribution paths.

Changes:

  • Extracted scoring/ranking logic into RunQueryScoring and updated the Run plugin query pipeline to use it.
  • Updated Run shortcut editing/saving to apply edits to the primary launch while preserving additional launches and companion/link metadata (with new unit tests).
  • Bundled the Run plugin into the EXE installer and hardened build/deploy scripts + docs to reflect the combined distribution.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/build-run-plugin.ps1 Adds build verification and safer deploy behavior when PowerToys is running/locking DLLs.
QuickShell/setup-template.iss Installs the Run plugin payload into the PowerToys Run plugins directory during EXE install.
QuickShell/build-exe.ps1 Builds the Run plugin alongside the EXE and injects its path into the Inno Setup script.
QuickShell.Run/ShortcutEditorWindow.cs Prefills fields from the primary launch and saves via TrySaveRunEditor, with preservation messaging.
QuickShell.Run/Main.cs Slims query logic and delegates scoring/utility inclusion to RunQueryScoring; updates some context menu glyphs.
QuickShell.Core/Services/RunQueryScoring.cs New shared scoring logic for browse vs search mode result ordering.
QuickShell.Core.Tests/ShortcutFormSaveRunEditorTests.cs Adds coverage for Run editor save behavior (create/edit/preserve/primary selection).
QuickShell.Core.Tests/RunQueryScoringTests.cs Adds coverage for browse-mode shortcut-vs-utility ranking and pin order behavior.
docs/powertoys-run-plugin.md Updates installation guidance to reflect WinGet/GitHub EXE bundling + Run-only ZIP option.
docs/install.md Updates installer type/steps and clarifies CmdPal vs Run behavior + restart guidance.
.github/workflows/release-extension.yml Updates release notes text to reflect EXE bundling and Run ZIP-only artifacts.

Comment thread QuickShell.Core/Services/RunQueryScoring.cs Outdated
Comment thread QuickShell/setup-template.iss
Comment thread QuickShell/build-exe.ps1 Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fdb669c11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/RunQueryScoring.cs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4cb0ab607a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Run/ShortcutEditorWindow.cs
@tonythethompson tonythethompson force-pushed the pr/unified-workspace-form branch from 3fdd084 to dccf8ac Compare July 3, 2026 05:11
tonythethompson added a commit that referenced this pull request Jul 3, 2026
Uninstall Run plugin in setup template, limit recency bonus to unpinned
shortcuts in browse mode, and repair invalid launch lists in Run editor save.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson tonythethompson force-pushed the pr/run-plugin-and-installer branch from 4cb0ab6 to 0d27328 Compare July 3, 2026 05:12
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tonythethompson tonythethompson changed the base branch from pr/unified-workspace-form to master July 3, 2026 07:55
tonythethompson and others added 4 commits July 3, 2026 00:56
Slim down QuickShell.Run Main.cs, rank shortcuts above utility commands,
improve Run editor multi-launch save, and package the plugin in Inno Setup
with hardened build/deploy scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Anthony Thompson <tonythethompson@hotmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Anthony Thompson <tonythethompson@hotmail.com>
Uninstall Run plugin in setup template, limit recency bonus to unpinned
shortcuts in browse mode, and repair invalid launch lists in Run editor save.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson tonythethompson force-pushed the pr/run-plugin-and-installer branch from c0652e6 to c874fb1 Compare July 3, 2026 07:56
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated line-level review (batch 1/2)

Comment thread QuickShell.Core/Services/RunQueryScoring.cs
Comment thread QuickShell.Core/Services/RunQueryScoring.cs
Comment thread QuickShell.Core/Services/RunQueryScoring.cs
Comment thread QuickShell.Core/Services/RunQueryScoring.cs Outdated
Comment thread QuickShell.Core.Tests/RunQueryScoringTests.cs
Comment thread QuickShell.Core.Tests/ShortcutFormSaveRunEditorTests.cs
Comment thread QuickShell.Core.Tests/ShortcutFormSaveRunEditorTests.cs
Comment thread QuickShell.Core/Services/ShortcutFormDraftStore.cs
Comment thread QuickShell.Core/Services/ShortcutFormDraftStore.cs Outdated

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment thread QuickShell.Run/ShortcutEditorWindow.cs

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment thread QuickShell.Run/ShortcutEditorWindow.cs

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment thread QuickShell/setup-template.iss

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment thread QuickShell/build-exe.ps1

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment thread QuickShell/build-exe.ps1

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

Comment thread scripts/build-run-plugin.ps1
Comment thread scripts/build-run-plugin.ps1
Comment thread scripts/build-run-plugin.ps1
Comment thread QuickShell/setup-template.iss
Comment thread QuickShell/setup-template.iss
Comment thread QuickShell/setup-template.iss
Comment thread QuickShell/setup-template.iss
Comment thread QuickShell/setup-template.iss

@tonythethompson tonythethompson left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18 issues require changes before this PR can be merged. Each finding is posted as an individual inline comment on the relevant line. Issues span: silent data loss in the launch-repair path (TryValidateLaunches discarding secondaries), a compiler error from internal visibility on RunQueryScoring used across assembly boundaries, non-deterministic test scores from DateTime.UtcNow in scoring logic, overbroad RuntimeException catching in the deploy script, a missing exit 1 on partial deploys, a hardcoded x64 path in setup-template.iss that would silently ship wrong-arch DLLs in an ARM64 build, relative Inno Setup source paths that break off-root builds, and several diagnostic gaps from discarded out _ validation errors. Please resolve each thread independently.

- RunQueryScoring: null PinOrder ranks last, search utility tiebreaker, injectable utcNow for tests
- TrySaveRunEditor: repair invalid launches in place instead of replacing the list
- ShortcutEditorWindow: normalize legacy launches once in constructor
- Installer: sentinel RunPluginSource, scoped uninstall deletes, absolute plugin paths
- build-run-plugin: narrow IO catches, fail deploy on locked files, validate staging plugin.json

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 947e8775c6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/RunQueryScoring.cs Outdated
tonythethompson and others added 2 commits July 3, 2026 04:21
Scale folder to tab-corner bounds, darken bolt outline, bump bolt size, and regenerate MSIX, store listing, and Run plugin assets.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pinned shortcuts without PinOrder now score above the maximum unpinned recency bonus while still ranking below explicitly ordered favorites.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 35 changed files in this pull request and generated 3 comments.

Comment thread QuickShell/setup-template.iss Outdated
Comment thread QuickShell/build-exe.ps1 Outdated
Comment thread QuickShell.Run/Main.cs Outdated
- Uninstall removes the full Run plugin directory to avoid mixed-version leftovers
- Use forward-slash Inno Setup paths in build-exe replacements to avoid regex backslash escapes
- Drop redundant intermediate sort in Run plugin Query()

Co-authored-by: Cursor <cursoragent@cursor.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

DevServerUrl = source.DevServerUrl,

P2 Badge Preserve dev-server auto-open flag

When an existing workspace has OpenDevServerOnLaunch = true, saving any Run-editor change through TrySaveRunEditor clones the dev-server URL but leaves the boolean at its default false, so subsequent workspace launches stop opening the dev-server link even though the editor says link settings are preserved. Copy source.OpenDevServerOnLaunch along with DevServerUrl to avoid silently disabling this setting.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread QuickShell.Core/Services/ShortcutFormDraftStore.cs
tonythethompson and others added 2 commits July 3, 2026 04:50
WaitForDraftFile polled File.Exists for 1s while SaveIfDirty writes
asynchronously, causing CI flakes. Flush the file-I/O queue before asserting.

Co-authored-by: Cursor <cursoragent@cursor.com>
CloneShortcut copied DevServerUrl but omitted OpenDevServerOnLaunch, so
Run-editor saves silently disabled auto-open despite keeping the URL.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 37 changed files in this pull request and generated 1 comment.

Comment thread QuickShell/build-exe.ps1 Outdated
tonythethompson and others added 2 commits July 3, 2026 05:14
Copilot review: forward-slash OutputDir and Source paths in build-exe.ps1
could break ISCC compilation or miss publish folder copies on Windows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson tonythethompson merged commit d967e02 into master Jul 3, 2026
4 checks passed
@tonythethompson tonythethompson deleted the pr/run-plugin-and-installer branch July 3, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants